-- CALC_CAVE_BONUS_15

-- 计算怪物巢穴副本奖励
-- @param user    玩家对象
-- @param args    奖励计算参数
-- @param grade   副本难度
-- @param layer   地牢层数
return function(user, args, grade, layer)
    -- caution：如果修改该公式，服务器请一并修改
    local randSeed  = DungeonM.getRandSeed("DUNGEON_CAVE15");
    local bonus;
    local arr = {};
    arr    = { { ["class_id"] = 7010, ["amount"] = 5, ["ratio"] = 25, },     -- 物品“黑棘种子”×5
               { ["class_id"] = 7010, ["amount"] = 10, ["ratio"] = 15, },    -- 物品“黑棘种子”×10
               { ["class_id"] = 7012, ["amount"] = 1, ["ratio"] = 15, },     -- 物品“血腥菟丝子”×1
               { ["class_id"] = 7013, ["amount"] = 1, ["ratio"] = 15, },     -- 物品“爆裂南瓜”×1
               { ["class_id"] = 7014, ["amount"] = 1, ["ratio"] = 15, },     -- 物品“水晶蘑菇”×1
               { ["class_id"] = 7015, ["amount"] = 1, ["ratio"] = 15, }, };  -- 物品“黄金曼陀罗”×1
    local ret = {};
    bonus = fetchElemBySeed(arr, randSeed);
    table.insert(ret, { 1, bonus["class_id"], bonus["amount"], });
    
    return ret;
end